﻿<%@ Page Title="" Language="C#" AutoEventWireup="true"
    CodeBehind="Default.aspx.cs" Inherits="PlugNT.Cms.Web.Member.Product.Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link rel="stylesheet" type="text/css" href="/Css/member.css" />
    <title>产品管理</title>
</head>
<body>
    <form id="frm_Main" runat="server">
        <ext:PageManager ID="pm_Main" AutoSizePanelID="rpnl_Main" runat="server" />
        <ext:RegionPanel ID="rpnl_Main" ShowBorder="false" runat="server">
            <Regions>
                <ext:Region ID="ren_Center" ShowHeader="false" Layout="Fit" Position="Center" Margins="2 2 2 0" runat="server">
                    <Items>
                        <ext:Panel ID="pnl_Main" runat="server" EnableBackgroundColor="true" BodyPadding="3px"
                            Height="" EnableLargeHeader="true" ShowBorder="false" ShowHeader="false"
                            Layout="Fit">
                            <Toolbars>
                                <ext:Toolbar ID="tlr_Btn" runat="server">
                                    <Items>
                                        <ext:Button ID="btn_Add" Icon="DatabaseAdd" Text="新增" runat="server"  OnClick="btn_BAdd_Click">
                                        </ext:Button>
                                        <ext:Button ID="btn_Delete" Icon="DatabaseDelete" ConfirmText="确定要删除选中行记录及其该行相关所有记录么？" Text="删除" runat="server"
                                            OnClick="btn_Delete_Click">
                                        </ext:Button>
                                        <ext:Button ID="btn_Search" Icon="DatabaseConnect" OnClick="btn_Search_Click" Text="筛选" runat="server">
                                        </ext:Button>
                                        <ext:Button ID="btn_Export" Icon="DatabaseTable" OnClick="btn_Export_Click" Text="导出" runat="server" DisableControlBeforePostBack="false" EnableAjax="false">
                                        </ext:Button>
                                        <ext:ToolbarFill ID="tbf_t" runat="server"></ext:ToolbarFill>
                                        <ext:DropDownList ID="ddl_PageSize" AutoPostBack="true" Width="80" OnSelectedIndexChanged="ddl_PageSize_SelectedIndexChanged" runat="server">
                                            <ext:ListItem Text="每页15条" Value="15" />
                                            <ext:ListItem Text="每页20条" Value="20" Selected="true" />
                                            <ext:ListItem Text="每页30条" Value="30" />
                                            <ext:ListItem Text="每页50条" Value="50" />
                                        </ext:DropDownList>
                                        <ext:Label ID="lbl_c" runat="server" Width="3"></ext:Label>
                                        <ext:DropDownList ID="ddl_Search" AutoPostBack="true" Width="80" OnSelectedIndexChanged="ddl_Search_SelectedIndexChanged"
                                            runat="server">
                                            <ext:ListItem Text="名称" Value="Name" /> 
                                        </ext:DropDownList>
                                        <ext:Label ID="lbl_r" runat="server" Width="3"></ext:Label>
                                        <ext:TwinTriggerBox ID="ttb_Search" runat="server" Width="150" EmptyText="输入要搜索的关键字"
                                            ShowTrigger1="false" OnTrigger1Click="ttb_Search_Trigger1Click" OnTrigger2Click="ttb_Search_Trigger2Click"
                                            Trigger1Icon="Clear" Trigger2Icon="Search">
                                        </ext:TwinTriggerBox>
                                    </Items>
                                </ext:Toolbar>
                            </Toolbars>
                            <Items>
                                <ext:Grid ID="gr_Main" ShowHeader="False" runat="server" EnableCheckBoxSelect="true" AllowSorting="true" PageSize="20" ShowBorder="true" AllowPaging="true" 
                                    OnSort="Gr_Sort" IsDatabasePaging="true" OnPageIndexChange="Gr_PageIndexChange" OnRowCommand="Gr_RowCommand" OnRowDataBound="Gr_RowDataBound" OnPreRowDataBound="Gr_PreRowDataBound"
                                    DataKeyNames="Id" AutoScroll="true" EnableRowDoubleClick="true" OnRowDoubleClick="Gr_RowDoubleClick">
                                    <Columns>
                                        <ext:TemplateField Width="50px" HeaderText="序号">
                                            <ItemTemplate>
                                                <%# gr_Main.PageIndex * gr_Main.PageSize+ Container.DataItemIndex + 1%>
                                            </ItemTemplate>
                                        </ext:TemplateField>
                                        <ext:BoundField HeaderText="名称" SortField="Name" DataField="Name" ExpandUnusedSpace="true" />
                                        <ext:BoundField HeaderText="类别" SortField="Type" DataField="Type" />
                                        <ext:BoundField HeaderText="售价" SortField="Price" DataField="Price" />
                                        <ext:BoundField HeaderText="状态" SortField="State" DataField="State" />
                                        <ext:LinkButtonField ConfirmTarget="Top" ColumnID="lbf_Edit" HeaderText="编辑" Width="50px" CommandName="Edit" Icon="Pencil" />
                                        <ext:LinkButtonField ConfirmText="确定要删除此记录及其相关所有记录么？" ConfirmTarget="Top" ColumnID="lbf_Delete" HeaderText="删除" Width="50px" CommandName="Delete" Icon="Delete" />
                                    </Columns>
                                </ext:Grid>
                            </Items>
                        </ext:Panel>
                    </Items>
                </ext:Region>
            </Regions>
        </ext:RegionPanel>
        <ext:Window ID="win_Edit" Hidden="true" EnableIFrame="true" Icon="ApplicationFormEdit" Target="Parent" runat="server"
            CloseAction="HidePostBack" IsModal="true" Width="880px" Height="550px" OnClose="win_Edit_Close">
        </ext:Window>
        <ext:Window ID="win_Search" Title="详细筛选" Hidden="true" Icon="ApplicationFormMagnify" Target="Self"
            runat="server" IsModal="true" CloseAction="HidePostBack" OnClose="win_Search_Close" Width="600px" Height="332px">
            <Items>
                <ext:Panel ID="pnl_Search" runat="server" Layout="Fit" ShowBorder="False" ShowHeader="false" Height="300px" EnableBackgroundColor="true">
                    <Items>
                        <ext:Form ID="sf_Search" BodyPadding="25px 15px" LabelWidth="100" AutoScroll="true" ShowBorder="false" ShowHeader="false" EnableBackgroundColor="true" runat="server">
                            <Rows>
                                <ext:FormRow ColumnWidths="50% 50%">
                                    <Items>
                                        <ext:TextBox ID="txt_NameD" runat="server" Label="标题" Text="">
                                        </ext:TextBox>
                                        <ext:TextBox ID="txt_UserD" runat="server" Label="发布者" Text="">
                                        </ext:TextBox>
                                    </Items>
                                </ext:FormRow>
                                <ext:FormRow ColumnWidths="50% 50%">
                                    <Items>
                                        <ext:CheckBoxList ID="cb_IsTopD" runat="server" Label="置顶" ColumnVertical="true">
                                            <ext:CheckItem Text="是" Value="1" />
                                            <ext:CheckItem Text="否" Value="0" />
                                        </ext:CheckBoxList>
                                        <ext:CheckBoxList ID="cbl_StatusD" runat="server" Label="状态" ColumnVertical="true">
                                            <ext:CheckItem Text="启用" Value="1" />
                                            <ext:CheckItem Text="禁用" Value="0" />
                                        </ext:CheckBoxList>
                                    </Items>
                                </ext:FormRow>
                                <ext:FormRow ColumnWidths="50% 50%">
                                    <Items>
                                        <ext:DatePicker ID="dp_ReleaseTimeD_Min" Label="发布时间-开始" runat="server">
                                        </ext:DatePicker>
                                        <ext:DatePicker ID="dp_ReleaseTimeD_Max" Label="发布时间-结束" runat="server">
                                        </ext:DatePicker>
                                    </Items>
                                </ext:FormRow>
                            </Rows>
                        </ext:Form>
                    </Items>
                    <Toolbars>
                        <ext:Toolbar ID="tbr_Search" Position="Bottom" runat="server">
                            <Items>
                                <ext:ToolbarFill ID="tf_sb" runat="server"></ext:ToolbarFill>
                                <ext:Button ID="btn_XSearch" Text="检索" ValidateForms="sf_Search" runat="server" Icon="TextRuler" OnClick="btn_XSearch_Click">
                                </ext:Button>
                                <ext:Button ID="btn_Return" Text="返回" runat="server" Icon="BulletGo" OnClick="btn_Return_Click">
                                </ext:Button>
                            </Items>
                        </ext:Toolbar>
                    </Toolbars>
                </ext:Panel>
            </Items>
        </ext:Window>
        <ext:Timer ID="tir_Main" Interval="3000" OnTick="tir_Main_Tick" EnableAjaxLoading="false"
            runat="server">
        </ext:Timer>
    </form>
</body>
</html>
